import javax.swing.JTextArea;
import java.text.*;

public class StatusWindow extends JTextArea {

	DecimalFormat df2 = new DecimalFormat("#.#");
	
	public void Refresh(Player a) {
		setText("");
		append("Status:\n\n");
		append("HP: " + a.getCurrentHP() + " / " + a.getMaxHP() + "\n");
		append("Endurance: " + a.getEndurance() + "\n");
		append("Strength: " + a.getStrength() + "\n");
		append("Agility: " + a.getAgility() + "\n");
		append("Intelligence: " + a.getIntelligence() + "\n");
		append("Willpower: " + a.getWillpower() + "\n\n");
		append("Damage Reduction: " + df2.format(a.calcArmour()) + "%\n\n");
		append("Available Skill Points: " + a.getSkillPoints() + "\n\n");
		for (StatusEffect p : a.getEffects()) {
			append(p.getName() + "\n");
		}
		
	}
	
}